<?php

namespace app\model;

use think\facade\Cache;
use think\Model;

class BocPage extends Model
{

    protected $table = 'boc_page';


    /**
     * 查询单条信息
     */
    public function get_info($key, $field = '*')
    {
        $info = Cache::get($key);
        if (empty($info)) {
            $info = self::field($field)->where(['key' => $key])->findOrEmpty()->toArray();
            Cache::set($key, $info);
        }
        return $info;
    }
}
